package com.sunwayhorizo.health.hl7.persistent.pk;

import java.io.Serializable;

public class RimCoreEntitiesPK implements Serializable {
    public Long entityId;
    public Long entityVersionNum;

    public RimCoreEntitiesPK() {
    }

    public RimCoreEntitiesPK(Long entityId, Long entityVersionNum) {
        this.entityId = entityId;
        this.entityVersionNum = entityVersionNum;
    }

    public boolean equals(Object other) {
        if (other instanceof RimCoreEntitiesPK) {
            final RimCoreEntitiesPK otherEntitiesPK = (RimCoreEntitiesPK)other;
            final boolean areEqual = 
                (otherEntitiesPK.entityId.equals(entityId) && otherEntitiesPK.entityVersionNum.equals(entityVersionNum));
            return areEqual;
        }
        return false;
    }

    public int hashCode() {
        return super.hashCode();
    }
}
